var app = getApp();
Component({
	options: {
		addGlobalClass: true,
	},
	data: {
		userInfo: wx.getStorageSync('userInfo'),
		map: wx.getStorageSync('map')
	},
	attached() {
		var that = this;
		this.setData({
			userInfo: wx.getStorageSync('userInfo'),
			map: wx.getStorageSync('map')
		});
	},
	methods: {
		geng: function() {
			this.setData({
				userInfo: wx.getStorageSync('userInfo')
			});
		},
		quit1: function() { //退出登录
			wx.showModal({
				title: '退出',
				content: '确定要退出登录吗？',
				success(res) {
					if (res.confirm) {
						wx.clearStorageSync();
						app.login();
						wx.reLaunch({
							url: '/pages/home/dealer/dealer'
						})
					} else if (res.cancel) {}
				}
			})
		}
	}
})
